function _common_tips(){
	  $.getScript("http://static.aceona.com/app_js/app_tipsbox.js",
				function() {
					$("#tips_mask").app_widgets_tips( {
						positionEle : ".share_txt .em_down",
						width : 420
					});
				});
	  }
	$(document).ready(
			function() {
				_common_tips();
				$("button.js_copy_url").click(function() {
					getJobUserLink({post_id:jobID,corp_id:corpID,share_type:"10"},function(data){
						copyUrl2(data);
					});
				//	getJobUserLink(jobID,corpID,function(data){
				//		copyUrl2(data);
				//	});
				});
			});
    
    /**微博转发
     * para: {id:'sohu',isNeedLoginTip:'登陆后分享可能会获得推荐奖金，确认吗?',loginedMethod:getJobUserLink}
     * 默认调用方式：snsShareFun({id:'tqq',isNeedLoginTip:''})
     * 调用该方法的前提条件：
     * 1.需要为本页面的内容隐藏域：tips_mask_share_title 赋值
     * 2.需要为本页面的URL隐藏域：tips_mask_share_url 赋值
     * 3.需要在调用本方法的页面声明变量 var jobID （工作ID） 并为给变量赋值
     * 4.用到全局变量变量：isLogin，保证该值的正确性
     */
    var goUrl;
    function snsShareFun(obj){
        //微博类型
		var v_type;
        //跳转到微博的URL
		var url ;
        //新开窗口tip
		var tip ;
        if (obj.id=="sohu"){
			url="http://t.sohu.com/third/post.jsp?url=?share_url&title=?share_title&content=utf-8";
            tip="转播到搜狐微博";
            v_type="0";
		}else if (obj.id=="tqq"){
			url="http://v.t.qq.com/share/share.php?title=?share_title&url=?share_url&site=www.aceona.com&appkey="+encodeURI('7c3450bbecd247758089ee8df5cf546c');
            tip="转播到腾讯微博";
            v_type="1";
		}else if (obj.id=="tsina"){
			url="http://v.t.sina.com.cn/share/share.php?title=?share_title&url=?share_url&appkey=" + 2937052444+ "&site=www.aceona.com&content=utf-8";
            tip="转播到新浪微博";
            v_type="2";
		}else if (obj.id=="qzone"){
			url="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=?share_url&title=?share_title";
            tip="转播到QQ空间";
            v_type="3";
		}else if (obj.id=="bsh"){
			url="http://bai.sohu.com/share/blank/add.do?link=?share_url&title=?share_title";
            tip="转播到白社会";
            v_type="4";
		}else if (obj.id=="douban"){
			url="http://www.douban.com/recommend/?url=?share_url&title=?share_title";
            tip="转播到豆瓣网";
            v_type="5";
		}else if (obj.id=="xiaonei"){
			url="http://share.renren.com/share/buttonshare.do?link=?share_url&title=?share_title";
            tip="转播到人人网";
            v_type="6";
		}
        goUrl = url;
		var isNeedLoginTip = obj.isNeedLoginTip;
		var loginedMethod = obj.loginedMethod;
		//判断是否需要登陆
		if(typeof(isNeedLoginTip)!="undefined")
		{
			getCurrentUser(function(result){
			    
		   	    if(result.RESULT=="unauthorized"){//未登陆
	       			if(isNeedLoginTip==''){
	       				isNeedLoginTip='登陆后分享可能会获得推荐奖金，确认吗?';
	       			}
	  				jConfirm(isNeedLoginTip,"温馨提示",
			       	         function(flag) 
			       	         {   
			       		         if(flag)
			       		         {
			       		             showLoginDiv();
			       		         }
			       		         else
			       		         {
			       		        	 commonShare(goUrl,tip);
			       		         }
			       	});
		   	    }else{//已经登陆
					if(typeof(loginedMethod)!="undefined")
					{
						loginedMethod(v_type,callback);
					}else{
						getJobUserLink({async:false,post_id:jobID,share_type:v_type},function(data){
							if(data!=null)
							{
								$("#tips_mask_share_url").val(data);
							}
							commonShare(goUrl,tip);
						});
					}
		   		}
	   	    });
		}else
		{
			commonShare(goUrl,tip);
		}
    } // end snsShareFun

	function commonShare(url,tip)
    {
    	//定义新开窗口样式
	    var defaultFeatures={
	        scrollbars:"no",
	        status:"yes",
	        resizable:"no",
	        titlebar:"no", 
	        width:screen.availWidth-400,
	        height:screen.availHeight-200,
	        top:Math.ceil(100),
	        left:Math.ceil(200)
        }
    	var shareTitle = $("#tips_mask_share_title").val();
		var shareUrl = $("#tips_mask_share_url").val();
    	var content = url.replace("?share_url",encodeURIComponent(shareUrl)).replace("?share_title",encodeURIComponent(shareTitle));
        window.open(content,tip,defaultFeatures);
    }
    
	//获取url
	function getJobUserLink(param, method) {
		$.get("/action?UserShareAction=0&action=getShareLink", param,
				function(data) {
					if (typeof method == "function") {
						method(data);
					} else {
						alert("method param error");
					}
				});
	}
